/*
 * @Author: ZhanXie
 * @Date: 2020-09-13 20:56:14
 * @LastEditors: ZhanXie
 * @LastEditTime: 2020-09-13 21:19:29
 * @Description: 微博 @ 用户的关系
 * @FilePath: /weibo/src/db/model/AtRelation.js
 */
const seq = require('../seq')
const { INTEGER, BOOLEAN } = require('../types')

const AtRelation = seq.define('atRelation', {
  userId: {
    type: INTEGER,
    allowNull: false,
    comment: '用户 id'
  },
  blogId: {
    type: INTEGER,
    allowNull: false,
    comment: '微博 id'
  },
  isRead: {
    type: BOOLEAN,
    allowNull: false,
    defaultValue: false, // 默认未读
    comment: '是否已读'
  }
})

module.exports = AtRelation


